<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>C++ Tutorial: Embedded Systems Programming</title>
  <meta
 content="C++ Tutorial: Embedded Systems Programming"
 name="description" />
  <meta
 content="C++ Tutorial, Embedded Systems Programming"
 name="keywords" />
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1" />
  <link type="text/css" rel="stylesheet" href="../images/bogostyleWidePre.css" />
</head>
<body>
<div id="page" align="center">
<div id="content" style="width: 800px;">
<div id="logo">
<div class="whitetitle" style="margin-top: 70px;">bogotobogo </div>
</div>
<div id="topheader">
<div class="headerbodytext" align="left"><br />
<strong>Bogotobogo</strong><br />
contact@bogotobogo.com </div>
<div class="smallgraytext" id="toplinks"><a href="../index.html">Home</a>
| <a href="../sitemap.html">Sitemap</a>
| <a href="../blog" target="_blank">Contact Us</a>
</div>
</div>
<div id="menu">
<div class="smallwhitetext" style="padding: 9px;" align="right"><a
 href="../index.html">Home</a>
| <a href="../about_us.html">About Us</a>
| <a href="../products.html">Products</a>
| <a href="../our_services.html">Our Services</a>
| <a href="../blog" target="_blank">Contact Us</a>
</div>
</div>
<div id="submenu">
<div class="smallgraytext" style="padding: 9px;" align="right">
<a href="../gif.html">Gif</a> 
|<a href="../java_applet.html">JavaApplet/Web Start</a>
| <a href="../flash.html">Flash</a>
| <a href="../shockwave.html">ShockWave</a>
| <a href="../svg.html">SVG</a>
| <a href="../iPhone.html">iPhone/iPad</a>
| <a href="../android.html">Android</a>
| <a href="../OnHTML5.html">HTML5</a>
| <a href="../Algorithms/algorithms.html">Algorithms</a>
| <a href="../News/NewsMain.html">News</a>
| <a href="../cplusplus/cpptut.html">C++</a>
| <a href="../Java/tutorial/on_java.html">Java</a>
| <a href="../php/phptut.html">PHP</a>
| <a href="../DesignPatterns/introduction.html">Design Patterns</a>
| <a href="../python/pytut.html">Python</a> 
| <a href="../CSharp/.netframework.html">C#</a>
| <a href="../forums.html">Forums</a> 
| <a href="../VisualBasicSQL/introduction.html">Visual Basic</a>
</div>
</div>

<div id="contenttext">
<br />
<!-- Use of this code assumes agreement with the Google Custom Search Terms of Service. -->
<!-- The terms of service are available at http://www.google.com/cse/docs/tos.html -->
<form name="cse" id="searchbox_demo" action="http://www.google.com/cse">
  <input type="hidden" name="cref" value="" />
  <input type="hidden" name="ie" value="utf-8" />
  <input type="hidden" name="hl" value="" />
  <input name="q" type="text" size="40" />
  <input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.com/cse/tools/onthefly?form=searchbox_demo&lang="></script>


<br />
<div style="padding: 10px;"><span class="titletext">C++ Tutorial - Embedded Systems Programming</span></div>

<div id="bookmarkshare">
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;username=khhong7"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=khhong7"></script>
</div>


<img src="../images/cplusplus/cpp_logo.jpg" alt="cplusplus logo"/>

<div class="bodytext" style="padding: 12px;" align="justify"> 
<div class="subtitle_2nd" id="FullList">Full List of C++ Tutorials</div>
<ul>
   <li><a href="cpptut.html">C++ Home</a> </li>
   <li><a href="string.html">String</a> </li>
   <li><a href="constructor.html">Constructor</a> </li>
   <li><a href="operatoroverloading.html">Operator Overloading</a> </li>
   <li><a href="virtualfunctions.html">Virtual Functions</a></li>
   <li><a href="dynamic_cast.html">Dynamic Cast Operator</a></li>
   <li><a href="typecast.html">Type Cast Operators</a></li>
   <li><a href="autoptr.html">Class auto_ptr</a></li>
   <li><a href="templates.html">Templates</a></li>
   <li><a href="references.html">References for Built-in Types</a></li>
   <li><a href="valuevsreference.html">Pass by Value vs. Pass by Reference</a></li>
   <li><a href="memoryallocation.html">Memory Allocation</a></li>
   <li><a href="friendclass.html">Friend Functions and Friend Classes</a></li>
   <li><a href="functors.html">Functors (Function Objects)</a></li>
   <li><a href="statics.html">Static Variables and Static Class Members</a></li>
   <li><a href="exceptions.html">Exceptions</a></li>
   <li><a href="pointers.html">Pointers</a></li>
   <li><a href="pointers2.html">Pointers II</a></li>
   <li><a href="pointers3.html">Pointers III</a></li>
   <li><a href="assembly.html">Taste of Assembly</a></li>
   <li><a href="smallprograms.html">Small Programs</a></li>
   <li><a href="linkedlist.html">Linked List Examples</a></li>
   <li><a href="binarytree.html">Binary Tree Example Code</a></li>
   <li><a href="stl.html">Standard Template Library (STL)</a></li>
   <li><a href="stl2.html">Standard Template Library (STL) II - Maps</a></li>
   <li><a href="stl3_iterators.html">Standard Template Library (STL) III - Iterators</a></li>
   <li><a href="slicing.html">Object Slicing and Virtual Table</a></li>
   <li><a href="this_pointer.html">The this Pointer</a></li>
   <li><a href="stackunwinding.html">Stack Unwinding</a></li>
   <li><a href="upcasting_downcasting.html">Upcasting and Downcasting</a></li>
   <li><a href="object_returning.html">Object Returning</a></li>
   <li><a href="private_inheritance.html">Private Inheritance</a></li>
   <li><a href="cplusplus_keywords.html">C++_Keywords</a></li>
   <li><a href="multithreaded.html">Multi-Threaded Programming - Terminology</a></li>
   <li><a href="multithreaded2A.html">Multi-Threaded Programming II - Native Thread for Win32 (A) </a></li>
   <li><a href="multithreaded2B.html">Multi-Threaded Programming II -  Native Thread for Win32 (B) </a></li>
   <li><a href="multithreaded2C.html">Multi-Threaded Programming II -  Native Thread for Win32 (C) </a></li>
   <li><a href="multithreaded2.html">Multi-Threaded Programming II - C++ Thread for Win32</a></li>
   <li><a href="multithreaded3.html">Multi-Threaded Programming III - C++ Class Thread for Pthreads</a></li>
   <li><a href="multithreadedDebugging.html">Multithread Debugging</a></li>
   <li><a href="embeddedSystemsProgramming.html">Embedded Systems Programming</a></li>
   <li><a href="boost.html">Boost</a></li>
   <li>Programming Questions and Solutions
    <ul>
       <li><a href="quiz_strings_arrays.html">Strings and Arrays</a></li>
       <li><a href="quiz_linkedlist.html">Linked List</a></li>
       <li><a href="quiz_recursion.html">Recursion</a></li>
       <li><a href="quiz_bit_manipulation.html">Bit Manipulation</a> </li>
       <li><a href="google_interview_questions.html">140 Google Interview Questions</a> </li>
    </ul>
   </li>
</ul>
</div>

<br />
<br />
<img src="images/embedded/GeyRyongSan.png" alt="GeyRyongSan"/>
<br />
<br />

<br />
<div class="bodytext" style="padding: 12px;" align="justify">
<div class="subtitle" id="embeddedsystems">Embedded Systems</div>
<p>When we talk about <strong>embedded systems</strong> programming, in general, 
it's about writing programs for <strong>gadgets</strong>.</p>
<p>Gadget with a brain is the embedded system. Whether the brain is a <strong>microcontroller</strong> 
or a <strong>digital signal processor (DSP)</strong>, gadgets have some interactions between hardware and software 
designed to perform one or a few <strong>dedicated functions</strong>, 
often with <strong>real-time computing</strong> constraints.</p>
<p>Usually, embedded systems are resource constrained compared to the desktop PC. Embedded systems, typically, have limited memory, small or no hard drives, and in some cases with no external network connectivity.</p>
<br />
<br /> 

<div class="subtitle_2nd" id="whylinux">Why Linux?</div>
<p>According to <a href="http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/Snapshot-of-the-embedded-Linux-market-April-2007"  target="_blank">LinuxDevices.com</a>, Linux has emerged as the dominant OS for embedded systems, and it will reach 70% of the market by 2012.</p>
<p>Go to <a href="#embeddedlinux">Embedded Linux</a>.</p>
<br />
<br /> 

<div class="subtitle_2nd" id="embeddedsystems2011">Embedded Software & Tools Market in 2011 by <a href="http://www.vdcresearch.com/market_research/embedded_software/product_detail.aspx?productid=2646" target="_blank">VDC Research</a></div>
<ol>
<li><p><strong>COMs gain traction as time-to-market accelerators for OEMs </strong> </p>
<p>By combining COM express modules with off-the-shelf COMs, suppliers are able to offer several different configurations of CPU boards and leverage COMs' interchangeable characteristics. CPU vendors can thus offer a fairly wide range of boards without incurring high design and inventory carrying costs. </p></li>

<li><p><strong>PC/104 module family under pressure </strong> </p>
<p>Although VDC data projects the PC/104 family will experience a single-digit rebound from the low points of the recent recession, vendors will have to commit resources to developing newer strategies in order for this technology to remain viable. Otherwise, the recovery of these architectures is likely to stall or decline in 2011. </p></li>

<li><p><strong>Asia continues to rise in the development of embedded technology </strong> </p>
<p>2011 will see further strengthening of the Asian embedded supplier community as supply chain synergies, R&D capabilities and fabrication automation increases between upstream and downstream ecosystem partners. </p></li>

<li><p><strong>China's growth will power MCU market </strong> </p>
<p> Continued economic growth in China will drive the country's automotive market and expand the need for MCU (microcontroller unit) technology. Despite reduction in government subsidies, VDC expects the Chinese automotive market to expand substantially through 2015, driving adoption of MCU solutions. </p></li>

<li><p><strong>Suppliers will invest in services value chain </strong> </p>
<p> While embedded hardware margins show signs of stability in 2011, it's clear to VDC that leading embedded suppliers also recognize the value their clients place on a range of services capabilities. As a result, many leading suppliers will try to differentiate by investing in critical aspects of the services value chain, from consulting capabilities to enhanced warranty and end-of-life policies. </p></li>

<li><p><strong>FPGA and GPU will expand into a number of market segments </strong> </p>
<p> The medical, industrial automation and military segments provide an attractive opportunity for FPGA (Field Programmable Gate Array) devices. From imaging equipment to diagnostic devices, there is a need for adaptable health care, factory control and military C4 solutions. The programmability, flexibility and reduced NRE (non-recurring engineering) costs associated with FPGAs will lend themselves to broader adoption in these markets. </p></li>

<li><p><strong>Tier 2/Tier 3 OEMs and ISVs will become more important </strong> </p>
<p>Investment in solutions requiring embedded platforms continues to rebound; however, the market will still be driven by small- to mid-sized projects. This is related to the slow return of larger, blanket purchase orders let by Tier 1 accounts and to the user community preferences for projects with smaller footprints that fit within narrower application definitions and require short, sharply defined systems integration support. These projects are tailor-made for local, expert ISVs and ISIs, as well as Tier 2/Tier 3 OEMs. </p></li>

<li><p><strong>The market explores HaaS (Hardware as a Service) bundles </strong> </p>
<p>Broad market expansion and deep application penetration of remote monitoring and control capabilities will advance across a number of market segments, foretelling a broader migration to managed services solution development and deployment models in supervisory monitoring and control applications. These embedded application clouds will require local points of presence (POPs) or on-site infrastructure and hardware rolled into service level agreements (SLAs) supporting the software and service delivery portions of contracts. </p></li>

<li><p><strong>Cross-platform processor suppliers learn to play nice </strong> </p>
<p>From broader, bigger, more aggressive, public licensing agreements to M&A, the market will force suppliers of CPU, FPGA and GPU (graphics processing unit) technologies to collaborate more in 2011. VDC Research's surveys of hundreds of OEMS across a number of embedded markets reveal significant growth in OEM plans to develop solutions on hybrid platforms incorporating two or more of these technologies. </p></li>

<li><p><strong>Competition will intensify and growth will accelerate </strong> </p>
<p>Even if the market does not return to pre-recession levels, growth will accelerate during 2011. VDC sees virtually every vertical market growing more than five percent, and most technology categories achieving the same five percent CAGR. However, profitability results may not be so positive. Demand for stable technologies, brutal price concessions and expanded services requirements will provide opportunities for differentiation and revenues, but not necessarily margin.
<li><p><strong>
Android to catalyze further growth in commercial Linux market</strong> </p>
<p>As device manufacturers take Android into new application classes beyond mobile, the commercial Linux market will experience further growth. </p></li>

<li><p><strong>Multi-OS systems will grow in designs </strong> </p>
<p> More application classes will have sophisticated UI functionality that is not supported by traditional OSs and end-users will seek out multi-OS systems. </p></li>

<li><p><strong>Virtualization in embedded and mobile systems will increase </strong> </p>
<p>Driven by hardware bill of materials savings and reduced concerns regarding additional run-time execution latencies and costs, operating system virtualization will provide increased growth opportunities, and therefore will continue to be a significant focus for many suppliers. </p></li>

<li><p><strong>Symbian's loss to become MeeGo's gain </strong> </p>
<p> Intel's increasing focus on embedded combined with Symbian's loss of strategic direction will drive additional gains for MeeGo as Nokia turns their attention toward the Linux-based platform. </p></li>

<li><p><strong>OEMs to increase focus on the use of web security test tools </strong> </p>
<p>Increased interaction with the cloud and web-based content by more embedded device classes will increase OEM focus on use of web security test tools. </p></li>

<li><p><strong>Telecom vertical will reaccelerate spend on commercial products </strong> </p>
<p>The increasing burden of mobile device data usage is driving the need for investment in wireless infrastructure and the telecom vertical market will reaccelerate spending on commercial products. </p></li>

<li><p><strong>Microsoft will regain relevance in the mobile phone sector </strong> </p>
<p>Riding the wave of Windows Phone 7 buzz, Microsoft will re-emerge as a leading player in the mobile phone arena.</p></li>

<li><p><strong>Another acquisition to come?</strong> </p>
<p>Following a string of high profile acquisitions in 2009/2010, VDC anticipates yet another major embedded real-time operating system supplier will get acquired in 2011.</p></li>

</ol>
<br />
<br /> 



<div class="subtitle_2nd" id="embeddedsystemsissues">Issues for Embedded Systems Programming</div>
<p>Here are some characteristics of embedded systems, and few systems suffer all of these constrains.</p>
<ul>
	<li>Reliability - failure is very expensive.</li>
	<li>Limited Resources - memory, processor cycles, power. </li>
      <li>Real-time Response. </li>
  	<li>A system may be Running Forever.</li>
</ul>
<p>The characteristics of embedded systems affect the embedded systems programming:</p>
<ul>
	<li>Correctness - producing the results at the right time, in the right order, 
and using only an acceptable set of resources.</li>
	<li>Fault tolerance </li>
      <li>No downtime. </li>
  	<li>Real-time constraints.</li>
  	<li>Predictability.</li>
  	<li>Concurrency.</li>
</ul>

<br />
<br /> 

<div class="subtitle_2nd" id="realtime">Real-time Applications - Predictability</div>
<p>Following features of C++ language are not predictable:</p>
<ul>
	<li><strong>new</strong> and <strong>delete</strong> <br />
	<ul>
		<li><p><strong>Static</strong> memory poses no special problem in embedded systems programming 
since all is taken care of before the program starts to run and long before a system is deployed.</p></li>
		<li><p><strong>Stack</strong> memory can be a problem because it is possible to use too much of it. 
One way is to avoid <strong>recursive</strong> functions and stick to <strong>iterative</strong> implementation.</p></li>
		<li><p><strong>Dynamic</strong> memory allocation is usually banned or restricted. 
<strong>new</strong> is either banned or its use restricted to a startup period, and <strong>delete</strong> is banned 
because of the <strong>predictability</strong> and <strong>fragmentation</strong>.</p> </li>
		<p>However, there are two data structures that are particularly useful for predictable memory allocations: 
	<strong>stacks</strong> and <strong>pools</strong>:</p>
		<ul>
		<li><strong>Pool</strong> is a data structure from which we can allocate object of a given type 
		and later deallocate such object.
		 A pool contains a maximum number of objects; that number is specified when the pool is created. </li>
		<li><strong>Stack</strong> is a data structure from which we can allocate chunks of memory and deallocate the last allocated chunk. 
		</li>
		</ul>
		<li>C++ standard containers such as <strong>vector</strong>, <strong>map</strong>, etc. and 
	the standard <strong>string</strong> are not to be used because they indirectly use <strong>new</strong>.</li>
	</ul>
	</li>
	<li><p><strong>Exceptions</strong> <br />
	How can we catch all <strong>exceptions</strong> and how long it will take to find a matching <strong>catch</strong>.</p>
	</li>
</ul>

<br />
<br /> 

<div class="subtitle_2nd" id="reliability">Reliability </div>
<p>Avoid language features and programming techniques that have proved error-prone. Pointers!</p>
<ul>
	<li>Explicit conversions which are unchecked and unsafe - avoid them.</li>
	<li>Passing pointers to array elements - An array is often passed to a function as a pointer to an element. 
	Therefore, they lose their size, so that the receiving function cannot directly tell how many elements are pointed to.
	This is a cause of many bugs.</li>
</ul>


<br />
<br /> 

<div class="subtitle_2nd" id="bits">Bits</div>
<p>In code meant to be portable, use should use <strong>&lt;limits&gt;</strong> to make sure our assumption about sizes is correct.
Here is the list of sizes of the primitive types:</p>
<ul>
   <li><strong>bool</strong> - 1 bit, but takes up a byte</li>
   <li><strong>char</strong> - 8 bits</li>
   <li><strong>short</strong> - 16 bits</li>
   <li><strong>int</strong> - 32 bits, but many embedded systems have 16-bit <strong>int</strong>s</li>
   <li><strong>long int</strong> - 32 bits or 64 bits</li>
</ul>

<br />
<br /> 

<div class="subtitle_2nd" id="bitset">bitset</div>
<pre>
#include &lt;iostream&gt;
#include &lt;bitset&gt;
#include &lt;iomanip&gt;

int main( ) 
{ 
	using namespace std;

	int i;
	while(cin >> i)
		cout << dec << i << "==" 
		<< hex << "0x" << i << "=="
		<< <font color="red">bitset<8*sizeof(int)>(i)</font><< endl;
	return 0; 
}
</pre>
<p>Outoput is:</p>
<pre>
4
4==0x4==00000000000000000000000000000100

8
8==0x8==00000000000000000000000000001000

16
16==0x10==00000000000000000000000000010000

32
32==0x20==00000000000000000000000000100000

127
127==0x7f==00000000000000000000000001111111
</pre>
<p>In the code, to print the individual bits of the integer, 
we used a standard library <strong>bitset</strong>:</p>
<pre>
bitset<8*sizeof(int)>(i)
</pre>
<p>A <strong>bitset</strong> is a fixed number of bits. 
In the above example, we used the number of bits in an <strong>int</strong>, 
which is <strong>8*sizeof(int)</strong>. Then, we initialized that <strong>bitset</strong> 
with <strong>i</strong>.</p>
<p>Another example:</p>
<pre>
#include &lt;iostream&gt;
#include &lt;bitset&gt;

int main( ) 
{ 
	using namespace std;

	const int max = 8;
	bitset&lt;max&gt; b;
	while(cin >> b) {
		cout << b << endl;
		for(int i = 0; i < max; ++i) cout << b[i];
		cout << endl;
	}                
}
</pre>
<p>Output is:</p>
<pre>
10100111
10100111
11100101
</pre>

<br />
<br /> 

<div class="subtitle_2nd" id="signed_unsigned">Signed and Unsigned</div>
<p>Let's look at the following example which looks innocent.</p>
<pre>
#include &lt;iostream&gt;
#include &lt;vector&gt;

int main( ) 
{ 
	using namespace std;

	const int max = 10;
	vector&lt;int&gt; v(max,77);

	for(int i = 0; i < v.size(); ++i) 
		cout << v[i] << endl;               
}
</pre>
<p>When we compile it, we get a warning something like this:</p>
<pre>
signed/unsigned mismatch
</pre>
<p>That's because the index <strong>i</strong> is <strong>signed</strong> integer, but <strong>v.size()</strong> is <strong>unsigned</strong> integer. Mixing signed and unsigned could lead to disaster. For instance, the loop variable <strong>i</strong> might overflow. In other words, <strong>v.size()</strong> might be larger than the largest signed <strong>int</strong>. Then, <strong>i</strong> would reach the highest value that could represent a positive integer in a signed <strong>int</strong>. Then, the next <strong>++</strong> couldn't yield the next-highest integer and would instead result in a negative value. The loop would never terminate!</p>
<p>Here, we have two choices:</p>
<ul>
    <li><strong>vector&lt;int&gt;::size_type</strong> 
<pre>
	for(vector&lt;int&gt;::size_type i = 0; i < v.size(); ++i)
		cout << v[i] << endl; 
</pre>
    </li>
    <li><strong>iterator</strong>
<pre>
	for(vector&lt;int&gt;::iterator it = v.begin(); it != v.end(); ++it) 
		cout << *it << endl;  </pre>
    </li>

</ul>
<p>The <strong>size_type</strong> is guaranteed to be unsigned, so the first form has one more bit to play with than the <strong>int</strong> version. That can be significant, but it is still gives only a single bit of range. The loop using iterators has no such limitation.</p>

<br />
<br /> 

<div class="subtitle_2nd" id="bitmanipulation">Bit Manipulation</div>
<p>"People who play with bits will be bitten"</p>
<p>"People who play with bytes will be bytten"</p>
<p>When do we need to manipulate bits?</p>
<ul>
    <li>flags as hardware indicators</li>
    <li>low-level communications - we need to extract from byte streams</li>
    <li>graphics - we need to compose picture out of several images</li>
    <li>encryption</li>
</ul>
<p>Here is an example of extracting information from a short integer.</p>
<pre>
#include &lt;iostream&gt;
#include &lt;bitset&gt;
int main( ) 
{ 
	using namespace std;

	const int max = 8;
	
	short val = 4;
	unsigned char left = val & 0xff;          // leftmost (least significant) byte
	cout << bitset&lt;max&gt;(left) << endl;

	unsigned char right = (val >> 8) & 0xff;  // rightmost (most significant) byte
	cout << bitset&lt;max&gt;(right) << endl;

	val = 256;
	right = (val >> 8) & 0xff;
	cout << bitset&lt;max>(right) << endl;

	val = 2*val;
	right = (val >> 8) & 0xff;
	cout << bitset&lt;max&gt;(right) << endl;

	val = -8;
	bool sign_bit = val & 0x8000;             // sign bit
	cout << sign_bit << endl;
}
</pre>
<p>Output is:</p>
<pre>
00000100
00000000
00000001
00000010
1
</pre>
<p>The operations are known as <strong>shift</strong> and <strong>mask</strong>. We <strong>shift</strong> to place the bits we want to consider to the rightmost (least significant) part of the word where they are easy to manipulate. We <strong>mask</strong> using and (&) together with a bit pattern such as <stron>0xff</strong> to eliminate the bits we do not want in the result.</p>


<br />
<br /> 

<div class="subtitle_2nd" id="processors">Processors of Embedded Systems</div>

<p>From <a href="http://en.wikipedia.org/wiki/Embedded_system" target="_blank">wiki</a></p>
<p>Firstly, Embedded processors can be broken into two broad categories: ordinary <strong>microprocessors (&micro;P)</strong> and <strong>microcontrollers ((&micro;C)</strong>, which have many more peripherals on chip, reducing cost and size. Contrasting to the personal computer and server markets, a fairly large number of basic CPU architectures are used; there are <strong>Von Neumann</strong> as well as various degrees of <strong>Harvard architectures</strong>, <strong>RISC</strong> as well as <strong>non-RISC</strong> and <strong>VLIW</strong>; word lengths vary from <strong>4-bit</strong> to <strong>64-bits</strong> and beyond (mainly in DSP processors) although the most typical remain <strong>8/16-bit</strong>. Most architectures come in a large number of different variants and shapes, many of which are also manufactured by several different companies.</p>
<p>
A long but still not exhaustive list of common architectures are: 65816, 65C02, 68HC08, 68HC11, 68k, 8051, <strong>ARM</strong>, AVR, AVR32, Blackfin, C167, Coldfire, COP8, Cortus APS3, eZ8, eZ80, FR-V, H8, HT48, M16C, M32C, MIPS, MSP430, PIC, <strong>PowerPC</strong>, R8C, SHARC, SPARC, ST6, SuperH, TLCS-47, TLCS-870, TLCS-900, Tricore, V850, x86, XE8000, Z80, AsAP etc.</p>


<br />
<br /> 

<div class="subtitle_2nd" id="embeddedlinux">Embedded Linux</div>
<p>From <a href="http://en.wikipedia.org/wiki/Embedded_Linux" target="_blank">wiki</a></p>
<p><strong>Embedded Linux</strong> is the use of Linux in embedded computer systems such as mobile phones, personal digital assistants, media players, set-top boxes, and other consumer electronics devices, networking equipment, machine control, industrial automation, navigation equipment and medical instruments. According to survey conducted by Venture Development Corporation, Linux was used by <strong>18%</strong> of embedded engineers.</p>
<p>Linux has been ported to a variety of processors not always suited for use as the processor of desktop or server computers, such as various CPUs including <strong>ARM</strong>, AVR32, Blackfin, ETRAX CRIS, FR-V, H8300, IP7000 M32R, m68k, MIPS, mn10300, <strong>PowerPC</strong>, SuperH, or Xtensa processors, as an alternative to using a proprietary operating system and toolchain.</p>

<p>The advantages of embedded Linux over proprietary embedded operating systems include no royalties or licensing fees, a stable kernel, a support base that is not restricted to the employees of a single software company, and the ability to modify and redistribute the source code. The disadvantages include a comparatively larger memory footprint (kernel and root filesystem), complexities of user mode and kernel mode memory access and complex device drivers framework.</p>
<p>
There are non-proprietary embedded operating systems that share the open-source advantages of Linux, without the memory requirements that make Linux unsuitable for many embedded applications.</p>


<br />
<br />
<img src="images/embedded/JiriSan.png" alt="JiriSan"/>
<br />
<br />





<br /><br />
<div class="subtitle_2nd" id="FullList">Full List of C++ Tutorials</div>
<ul>
   <li><a href="cpptut.html">C++ Home</a> </li>
   <li><a href="string.html">String</a> </li>
   <li><a href="constructor.html">Constructor</a> </li>
   <li><a href="operatoroverloading.html">Operator Overloading</a> </li>
   <li><a href="virtualfunctions.html">Virtual Functions</a></li>
   <li><a href="dynamic_cast.html">Dynamic Cast Operator</a></li>
   <li><a href="typecast.html">Type Cast Operators</a></li>
   <li><a href="autoptr.html">Class auto_ptr</a></li>
   <li><a href="templates.html">Templates</a></li>
   <li><a href="references.html">References for Built-in Types</a></li>
   <li><a href="valuevsreference.html">Pass by Value vs. Pass by Reference</a></li>
   <li><a href="memoryallocation.html">Memory Allocation</a></li>
   <li><a href="friendclass.html">Friend Functions and Friend Classes</a></li>
   <li><a href="functors.html">Functors</a></li>
   <li><a href="statics.html">Static Variables and Static Class Members</a></li>
   <li><a href="exceptions.html">Exceptions</a></li>
   <li><a href="pointers.html">Pointers</a></li>
   <li><a href="pointers2.html">Pointers II</a></li>
   <li><a href="pointers3.html">Pointers III</a></li>
   <li><a href="assembly.html">Taste of Assembly</a></li>
   <li><a href="smallprograms.html">Small Programs</a></li>
   <li><a href="linkedlist.html">Linked List Examples</a></li>
   <li><a href="binarytree.html">Binary Tree Example Code</a></li>
   <li><a href="stl.html">Standard Template Library (STL)</a></li>
   <li><a href="stl2.html">Standard Template Library (STL) II - Maps</a></li>
   <li><a href="stl3_iterators.html">Standard Template Library (STL) III - Iterators</a></li>
   <li><a href="slicing.html">Object Slicing and Virtual Table</a></li>
   <li><a href="this_pointer.html">The this Pointer</a></li>
   <li><a href="stackunwinding.html">Stack Unwinding</a></li>
   <li><a href="upcasting_downcasting.html">Upcasting and Downcasting</a></li>
   <li><a href="object_returning.html">Object Returning</a></li>
   <li><a href="private_inheritance.html">Private Inheritance</a></li>
   <li><a href="cplusplus_keywords.html">C++_Keywords</a></li>
   <li><a href="multithreaded.html">Multi-Threaded Programming - Terminology</a></li>
   <li><a href="multithreaded2A.html">Multi-Threaded Programming II - Native Thread for Win32 (A) </a></li>
   <li><a href="multithreaded2B.html">Multi-Threaded Programming II -  Native Thread for Win32 (B) </a></li>
   <li><a href="multithreaded2C.html">Multi-Threaded Programming II -  Native Thread for Win32 (C) </a></li>
   <li><a href="multithreaded2.html">Multi-Threaded Programming II - C++ Thread for Win32</a></li>
   <li><a href="multithreaded3.html">Multi-Threaded Programming III - C++ Class Thread for Pthreads</a></li>
   <li><a href="multithreadedDebugging.html">Multithread Debugging</a></li>
   <li><a href="embeddedSystemsProgramming.html">Embedded Systems Programming</a></li>
   <li><a href="boost.html">Boost</a></li>
   <li>Programming Questions and Solutions
    <ul>
       <li><a href="quiz_strings_arrays.html">Strings and Arrays</a></li>
       <li><a href="quiz_linkedlist.html">Linked List</a></li>
       <li><a href="quiz_recursion.html">Recursion</a></li>
       <li><a href="quiz_bit_manipulation.html">Bit Manipulation</a> </li>
       <li><a href="google_interview_questions.html">140 Google Interview Questions</a> </li>
    </ul>
   </li>
</ul>
<br /><br />


<br />


<br />
<br />
<br />


</div>
</div>
<div class="smallgraytext" id="footer"><a href="../index.html">Home</a>
| <a href="../about_us.html">About Us</a>
| <a href="../products.html">products</a>
| <a href="../our_services.html">Our Services</a>
| <a href="#">Contact Us</a>
| Bogotobogo &copy; 2011 | <a target="_blank" href="http://www.bogotobogo.com">Bogotobogo </a>
</div>
</div>
</div>
</body>
</html>
